databasemanagementfandomcom-20200214-history
Ruby on Rails
Introduction Ruby on Rails (henceforth "Rails") is a full-stack web application framework written in ruby. It's goal is to make development, deployment and maintenance of web applications easier. It does this by taking a minimalist and standardized approach to the many aspects of web applications while adhering to methodologies like DRY, CRUD, and RAD. History Rail's first public release was in July of 2004 http://rubyforge.org/frs/?group_id=307. It was released by David Heinemeier Hansson who was working on Basecamp at the time, a very popular web based project management tool. The framework was extracted from the code running Basecamp, then streamlined for public release. Since Ruby on Rails was released in 2004, it has grown in popularity ever since. It currently has over 2,000 contributors and has a growing community of users and knowledge. Development Principles The following are a few software principles that make rails stand out from other web frameworks. Convention Over Configuration The principles of convention over configuration refers to the assumptions that Rails make concerning the defaults within an application. Many web frameworks such as Struts, Django and Symfony require many lengthy configuration files to be created before even the simplest of applications can be run. One blatant example of this is the XML sit-ups needed to get a servlet running in Java http://www.caucho.com/resin-3.0/servlet/tutorial/helloworld/index.xtp. Rails attempts to solve this problem by making several assumptions. These assumptions are drawn from the most common similarities found amongst web applications. These assumptions include: database schema design, URL patterns, and the prohibition of compound primary keys. One example of how Ruby on Rails uses principles of convention over configuration is by the use of the built in component to Rails called ActiveRecord. In essence, ActiveRecord handles accessing data in a database. A database table or view is wrapped in a class. Due to this, an object instance is directly tied to a single row in the table. For example, if you create a table called "students" in the database, there will also be a class that can be used called Student. Using this method in Ruby on Rails creates a consistent model between business objects and database tables. Don’t Repeat Yourself The principle of Don't Repeat Yourself (DRY) is method where one doesn't use functionally redundant code. This idea is at the core of Rails. When applied, this principle allows a programmer to make a single authoritative instance of functional code which in-turn reduces development and maintenance time. Agile Development The traditional approach to software development using the Waterfall Model. This has been shown not to be efficient http://www.readwriteweb.com/archives/the_future_of_software_development.php. The Agile Development principle, as outlined in the Agile Manifesto , uses small teams of developers to produce programs in small iterative chunks. This is a methodology whereby an adaptive top-down approach to design is taken. Current Version As of December 1, 2011, Ruby on Rails is in version 3.1.0. Rails 3.1 offer many improvements over the previous Rails 3.0 version. The most notable features of Rails version 3.1 are: *Enhanced asset pipeline to allow for the use of Sprockets 2.0 and better organization of plugins *SCSS and Coffeescript by default *HTTP streaming to allow the browser to download stylesheets and Javascript files on the fly *Jquery is the default Javascript library *Various bug fixes and security improvements For a full description on all of the new features, as well as upgrading from previous versions to version 3.1, please visit http://guides.rubyonrails.org/3_1_release_notes.html Applications Created with Ruby on Rails Backpack ODEO Blinksale Penny Arcade Jobster External Links Ruby on Rails homepage Ruby homepage Ruby on Rail wiki Author Details *Original article by Nicholas Carlson (BACS485) on 10/25/07 *Uupdated with rails 3.1 info by Kevin Collignon (BACS485) on 12/01/2011 Category:Current Version